<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
	
	<h:head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	</h:head>		
	
	<h:body>
		<ui:composition template="/WEB-INF/facelets/template.xhtml">	
		<ui:define name="body">	
		<f:view>
			<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>               
			<p:dialog modal="true" widgetVar="statusDialog" header="Loading"  draggable="false" closable="false">  
   				<p:graphicImage value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/images/ajaxloadingbar.gif" />   
			</p:dialog>
			<h:form id="formDialog">
			<p:growl id="men"/>
				<p:panel id="mensajes"  style="background: transparent !important; height: 10%; width: 40%; margin-left: auto; margin-right: auto;  border: none;" >
				<p:messages id="msg" />
				</p:panel>
				
					<p:panel id="panelAreasInvolucradas" header="Areas Involucradas" style="height: 20%; width: 40%; margin-left: auto; margin-right: auto;  border: none;" >							
						<h:panelGrid columns="2" id="panelGrid" >



							<h:outputText id="msgEstadoRegistro" value="* Estado:" />
							<p:selectOneMenu id="estado" binding="#{areasInvolucradasView.estado}"
								value="#{areasInvolucradasView.estadoRegistro}"   required="true"   requiredMessage="El estado es requerido"  >
								<f:selectItem itemLabel="Seleccione" itemValue="" />
								<f:selectItem itemLabel="ACTIVO" itemValue="A" />
								<f:selectItem itemLabel="INACTIVO" itemValue="R" />
							</p:selectOneMenu>

							<h:outputText id="msgNombreArea" value="* Nombre del Área: "/>
							<p:inputText id="txtNombreArea"  required="true"   requiredMessage="Nombre del área  requerido" binding="#{areasInvolucradasView.txtNombreArea}"/>
													
											
																	   </h:panelGrid>
				</p:panel>
	   			<p:panel id="panelBotones"  style="height: 6%; width: 40%; margin-left: auto; margin-right: auto;" >
					<div align="center">					
						<p:commandButton id="btnSave" binding="#{areasInvolucradasView.btnSave}"  value="Guardar" action="#{areasInvolucradasView.action_save()}" update="panelAreasInvolucradas,msg,panelBotones" />
						<p:commandButton id="btnDelete" binding="#{areasInvolucradasView.btnDelete}" disabled="true" value="Delete" action="#{areasInvolucradasView.action_delete_master()}" onclick="if(!confirm('Do you really want to delete this Entry?')){return false;}" update="panelAreasInvolucradas,msg,panelBotones" />
						<p:commandButton id="btnClear" value="Clear" action="#{areasInvolucradasView.action_clear()}" update="panelAreasInvolucradas,msg,panelBotones" />
					</div>
				</p:panel>			
			</h:form>
		</f:view>
			</ui:define>		
		</ui:composition>	
	</h:body>	
</html>	